<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://xmlns.jcp.org/jsf/html"
      xmlns:p="http://primefaces.org/ui"
      xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
      xmlns:f="http://xmlns.jcp.org/jsf/core">
<h:head>
    <title>Edit Hotel</title>
</h:head>
<h:body onload="#{HotelEditManaged.loadHotel()}">
	<h:form>
	<p:menubar>  
        <p:submenu label="Package Section" >  
            <p:menuitem value="Create Package" url="packageInsertion.xhtml" />  
            <p:menuitem value="All Packages" url="package.xhtml" />  
        </p:submenu>  
  
        <p:submenu label="Hotel Section" >  
            <p:menuitem value="Add Hotel" url="hotelInsert.xhtml" />  
            <p:menuitem value="All Hotel" url="hotel.xhtml" />  
        </p:submenu>  
        
         <p:submenu label="Transportation Section" >  
            <p:menuitem value="Add Transportation" url="transportationInsert.xhtml" />  
            <p:menuitem value="All Transportation" url="transportationMean.xhtml" />  
        </p:submenu>  
        
         <p:submenu label="Excursion Section" >  
            <p:menuitem value="Add Excursion" url="excursionInsert.xhtml" />  
            <p:menuitem value="All Excursion" url="excursion.xhtml" />  
        </p:submenu>  
  
       <f:facet name="options">   
       		<p:commandButton value="Check OutDated Package" action="#{CheckInvalid.checkAll()}"/>
            <p:commandButton value="Logout" action="#{LoginManaged.logout()}"/>
       </f:facet>
    </p:menubar>  
    </h:form>
    <h:form>
		<p:panelGrid columns="3">
			<p:outputLabel value = "Name:"/>
			<p:inputText id="name" value="#{HotelEditManaged.hDTO.name}"/>
			<p:message for="name" />
			
			<p:outputLabel value = "Available Places:"/>
			<p:inputText id="availablePlaces" value="#{HotelEditManaged.hDTO.availablePlaces}"/>
			<p:message for="availablePlaces" />
			
			<p:outputLabel value = "Description:"/>
			<p:inputText id="description" value="#{HotelEditManaged.hDTO.description}"/>
			<p:message for="description" />
			
			<p:outputLabel value = "Website:"/>
			<p:inputText id="website" value="#{HotelEditManaged.hDTO.website}"/>
			<p:message for="website" />
			
			<p:outputLabel value = "EMail:"/>
			<p:inputText id="email" value="#{HotelEditManaged.hDTO.email}"/>
			<p:message for="email" />
			
			<p:outputLabel value = "City:"/>
			<p:outputLabel id="city" value="#{HotelEditManaged.hDTO.city}"/>
			<p:outputLabel value = " Not Editable"/>
			
			<p:outputLabel value = "Stars:"/>
			<p:inputText id="stars" value="#{HotelEditManaged.hDTO.stars}"/>
			<p:message for="stars" />
			
			<p:outputLabel value = "Address:"/>
			<p:inputText id="address" value="#{HotelEditManaged.hDTO.address}"/>
			<p:message for="address" />
			
			<p:outputLabel value = "Phone:"/>
			<p:inputText id="phone" value="#{HotelEditManaged.hDTO.phone}"/>
			<p:message for="phone" />
			
			<p:outputLabel value = "Price:"/>
			<p:outputLabel id="price" value="#{HotelEditManaged.hDTO.price}"/>
			<p:outputLabel value=" Not Editable" />
			
		</p:panelGrid>	
		<p:panelGrid columns="1">
		<f:facet name="footer">
				<p:commandButton value="Save" action="#{HotelEditManaged.update}" ajax="false" />
			</f:facet>
		</p:panelGrid>
		<p:messages id="messages" showDetail="true" autoUpdate="true" closable="true" />
	</h:form>
</h:body>
</html>